import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:get/get.dart';
import 'package:sports_new/view/live/items/gift_effect_view.dart';
import 'package:sports_new/view/overlay/live_float_widget.dart';
import 'package:sports_new/view/overlay/match_tip_float_widget.dart';
import 'package:sports_new/view/overlay/ads_float_widget.dart';
import 'package:sports_new/view/home/news_float2_widget.dart';

class AppFloatWidget extends StatefulWidget {
  const AppFloatWidget({super.key, required this.child});

  final Widget? child;

  @override
  State<AppFloatWidget> createState() => _AppFloatWidgetState();
}

class _AppFloatWidgetState extends State<AppFloatWidget> {

  @override
  Widget build(BuildContext context) {
    return Material(
      child: MediaQuery(
        data: MediaQuery.of(context).copyWith(textScaler: TextScaler.linear(1.0)),
        child: Stack(
          children: [
            Container(child: widget.child),
            const AdsFloatWidget(),
            const NewsFloat2Widget(),
            const Positioned.fill(child: LiveFloatWidget()),
            const MatchTipFloatWidget(),
          ],
        )
      )
    );
  }
}
